# coding=utf-8
from django.db import models

# Create your models here.

GENDER_CHOICES = (('M', 'Male'), ('F', 'Female'),)
IDENTITY_CHOICES = (
    ('AC', 'Advisory Committee'), 
    ('TC', 'Technical Committee'),
    ('FT', 'Faculty'),
    ('AS', 'Administrative Staff'),
    ('TS', 'Technical Staff'),
    ('IT', 'Interns'),
    ('AU', 'Alumni'),)

class Person(models.Model):
    person_name_en = models.CharField(verbose_name='Name', max_length=127)
    person_name_zh = models.CharField(verbose_name='姓名', max_length=127)
    person_gender = models.CharField(verbose_name='Gender', choices=GENDER_CHOICES, default='M', max_length=1)
    person_identity = models.CharField(verbose_name='Identity', choices=IDENTITY_CHOICES, max_length=2)
    person_education_en = models.CharField(verbose_name='Education Background', max_length=127)
    person_education_zh = models.CharField(verbose_name='学历', max_length=127)
    person_title_en = models.CharField(verbose_name='Job Title', max_length=127)
    person_title_zh = models.CharField(verbose_name='职称', max_length=127)
    person_introduction_en = models.TextField(verbose_name='Self Introduction', blank=True)
    person_introduction_zh = models.TextField(verbose_name='个人简介', blank=True)
    person_homepage = models.URLField(verbose_name='Homepage', blank=True, max_length=255)  #   verify_exists ???
    person_image = models.ImageField(verbose_name='Image', upload_to='uploads/persons', blank=True, max_length=255)

    def __unicode__(self):
        return self.person_name_zh

    class Meta:
        ordering = ['person_name_zh']
